import * as React from 'react'

interface QuizChartProps {
    chartPath: string
}

const QuizChart: React.FC<QuizChartProps> =
    ({ chartPath }) => {
        let imgSrc = chartPath
            ? `https://s3.cn-north-1.amazonaws.com.cn/tws-system-logic-puzzle/files/${chartPath}`
            : 'http://www.festival56.com/images/loading.gif'

        return <div>
            <img alt="chart" src={imgSrc} />
        </div>
    }

export default QuizChart